<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@include file="/WEB-INF/jsp/base/taglibs.jsp"%>
<%@include file="/WEB-INF/jsp/base/head.jsp"%> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="image/x-icon" href="images/favicon.ico" rel="shortcut icon" />
<%
//清除页面缓存
response.setHeader("Pragma","No-cache");
response.setHeader("Cache-Control","no-cache");
response.setHeader("Cache-Control","no-store");
response.setDateHeader("Expires", 0);
%>
<head>
<title>用户登录</title>
<style type="text/css">
<!--
body {
    margin:0;
	background-color: #016aa9;
	overflow:hidden;
}
.STYLE1 {
	color: #000000;
	font-size: 12px;
}
#btnEnter{
    background:url("<%=request.getContextPath()%>/images/dl.gif") repeat scroll 0 0 transparent;
    width: 49px;
    height:18px;
    border:none;
    text-indent:5000px;  
    cursor:pointer;  
}
.errorMessage{list-style:none;font-size:12px;text-align:center;color:red;}
-->
</style>
<script type="text/javascript">
function check(){
	var username = $("#username"),
	    password = $("#password"),
	    rand = $("#rand"),
	    userVal = username.val(),
	    passVal = password.val(),
	    randVal = rand.val();
	if(userVal == null || userVal == ""){
		alert("用户名不能为空!");
		username.css("border","1px solid red");
		username.focus();
		return false;
	}else{
		username.css("border","none");
	}
	if(passVal == null || passVal == ""){
		alert("密码不能为空!");
		password.css("border","1px solid red");
		password.focus();
		return false;
	}else{
		password.css("border","none");
	}
	if(randVal == null || randVal == ""){
		alert("随机码不能为空!");
		rand.css("border","1px solid red");
		rand.focus();
		return false;
	}else{
		rand.css("border","none");
	}
}
</script>
</head>

<body>
<s:form action="loginAction!login" namespace="/user" method="post">
	<div style="height:0px; width:0px;top:50%; left:50%;position:absolute;">
		<div style="background-image:url('<%=request.getContextPath() %>/images/login_03.jpg'); width:962px; height:235px;position:absolute; margin-left:-485px;margin-top:-359px">
		</div>
		<div style="background-image:url('<%=request.getContextPath() %>/images/login_05.gif'); width:394px; height:53px;position:absolute; margin-left:-485px;margin-top:-125px"></div>
		<div style="background-image:url('<%=request.getContextPath() %>/images/login_06.gif'); width:207px; height:53px;position:absolute; margin-left:-91px;margin-top:-125px">
			<div align="center" style="position:absolute;margin-top: -14px;margin-top: -16px\9;">
				<span class="STYLE1">用户名：</span>
				<input id="username" type="text" name="user.userName" style="width:105px; height:22px; background-color:#292929; border:solid 1px #7dbad7; font-size:12px; color:#6cd0ff" />
			</div>
			
			<div align="center" style="position:absolute;margin-top: 12px;margin-top: 10px\9;">
				<span class="STYLE1"><span style="margin-right: 12px;">密</span><span>码：</span></span>
				<input id="password" type="password" name="user.password" style="width:105px; height:22px; background-color:#292929; border:solid 1px #7dbad7; font-size:12px; color:#6cd0ff" />
			</div>
		</div>		
		<div style="background-image:url('<%=request.getContextPath() %>/images/login_07.gif'); width:362px; height:53px;position:absolute; margin-left:115px;margin-top:-125px">
		</div>
		<div style="background-image:url('<%=request.getContextPath() %>/images/login_08.gif'); width:962px; height:213px;position:absolute; margin-left:-485px;margin-top:-73px">
		<div align="center">
			<div style="position:absolute\9; margin-left: -14px; margin-top: -13px;margin-left: -87px\9;margin-top: -14px\9;">
				<span class="STYLE1">验证码：</span>
				<input type="text" id="rand"  name="rand" value="${rand}" maxlength="4" style="width:40px;height:22px; background-color:#292929; border:solid 1px #7dbad7; font-size:12px; color:#6cd0ff"/>
				<img width="60px" height="22px" src="<%=request.getContextPath() %>/basicInfo/createValidateAction.do?d&<%=new java.util.Date()%>" onclick='this.src="<%=request.getContextPath() %>/basicInfo/createValidateAction.do?d&"+(new Date())' title="点击产生随机数" style="cursor:pointer; vertical-align:middle;margin-top: -3px;margin-top:-7px\9"/>
				<input style="position:absolute;margin: 28px 0 0 -106px;" type="submit" value="" id="btnEnter" style="background-image:url('<%=request.getContextPath()%>/images/dl.gif')"/>
			</div>
			</div>
			<div style="margin-left: 200px;margin-top: 80px;">
				<s:if test="%{error=='true'}">
			       	<div style=" height:20;width:600px; text-align: center; font-weight: bold; color:#ff0000; font-size:12px">
			       		<d:screenItem key="${errorMsg}"/>
			       	</div>
				</s:if>
				<s:elseif test="%{#parameters.messageID!=null}">            
			       	<div style=" height:20;width:600px; text-align: center; font-weight: bold; color:#ff0000; font-size:12px">
			       		<d:message key="${param.messageID}"/>
			       	</div>
				</s:elseif>  
			</div>
		</div>
	</div>	
</s:form>
</body>
</html>
